'use strict';
var wechat = require('../routes/wechat');

module.exports = function(server) {
  // Install a `/` route that returns server status
  var router = server.loopback.Router();
  router.get('/', server.loopback.status());
  router.get('/deploy', function (req, res) {
    var exec = require('child_process').execSync;
    res.send(exec("git pull", { encoding: 'utf8' }));
  });
  server.use(router);
  server.use('/wechat', wechat);
};
